package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"ruoyi-vue-pro-go/internal/model/entity"
)

type GetListReq struct {
	g.Meta `path:"/admin-api/system/role-menu/list" method:"get" tags:"role menu" permission:"system:permission:assign-role-menu" summary:"Get role menu list"`
}
type GetListRes struct {
	List []*entity.SystemRoleMenu `json:"list" dc:"role menu list"`
}

type GetListByRoleIdsReq struct {
	RoleIds []int64 `json:"role_ids" dc:"role ids"`
}
type GetListByRoleIdsRes struct {
	List []*entity.SystemRoleMenu `json:"list" dc:"role menu list"`
}

type GetMenuIdListByRoleIdReq struct {
	g.Meta `path:"/admin-api/system/permission/list-role-menus" method:"get" tags:"role menus" permission:"system:permission:assign-role-menu" summary:"Get role menu list by role id"`
	RoleId int64 `json:"roleId" dc:"role id"`
}
type GetMenuIdListByRoleIdRes struct {
	MenuIds []int64 `json:"list" dc:"menu id list"`
}

type AssignRoleMenuReq struct {
	g.Meta  `path:"/admin-api/system/permission/assign-role-menu" method:"post" tags:"role menus" permission:"system:permission:assign-role-menu" summary:"Assign role menu"`
	RoleId  int64   `v:"required" dc:"role id"`
	MenuIds []int64 `v:"required" dc:"menu ids"`
}
type AssignRoleMenuRes struct{}
